import apiClient from './apiClient'

export const reviewService = {
  // 获取待审核评论列表
  getPendingReviews: async (params = {}) => {
    const { page = 0, size = 10, type, source } = params
    return await apiClient.get('/reviews/pending', {
      params: { page, size, type, source }
    })
  },

  // 批量审核评论
  batchReview: async (reviewRequests) => {
    return await apiClient.post('/reviews/batch-review', reviewRequests)
  },

  // 审核单个评论
  reviewComment: async (reviewRequest) => {
    return await apiClient.put('/reviews/review', reviewRequest)
  },

  // 获取评论详情
  getReviewDetail: async (reviewId) => {
    return await apiClient.get(`/reviews/${reviewId}`)
  },

  // 删除评论
  deleteReview: async (reviewId) => {
    return await apiClient.delete(`/reviews/${reviewId}`)
  },

  // 获取审核统计
  getReviewStats: async () => {
    return await apiClient.get('/reviews/stats')
  },

  // 获取评论总数
  getCommentCount: async () => {
    return await apiClient.get('/reviews/count')
  },

  // 获取最近活动
  getRecentActivities: async () => {
    return await apiClient.get('/reviews/activities')
  }
}